
<body>

    <div class="warp h">
        <!--header-->
        <header class="hd br">
            <a href="<?php echo $base_url?>home/order/userorders" class="l-icon only-icon">
            <i class="iconfont icon-left1"></i>            
        </a>
            <p class="tit2">
                订单详情
            </p>
        </header>
    <?php if($data['status']==4) : ?>
        <div class="surplustime-box">
            <p class="tit">待付款 </p>
            <p class="msg">
                已超时，订单被取消
            </p>
        </div>
    <?php elseif($data['status']==1 || $data['status']==2 || $data['status']==5) :?>
        <div class="order-banner">
			<?php if($data['status']==2) : ?>
			     <span class="msg_txt">交易完成,已发货</span>
            <?php else:?>
                 <span class="msg_txt">交易完成,待发货</span>
            <?php endif;?>
            <img src="/static/dist/images/succes-order.jpg" alt="">
            <a href="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzAwMTU0NjM1MQ==&scene=110#wechat_redirect">
                <i class="iconfont icon-xiaolvdashiicon02-copy-copy"></i>
                点击关注微信公众号</a>
        </div>
        <div class="line-box"></div>
        <?php if(!empty($data['logistics'])):?>
		<div class="kd_bar">
			<div class="ico">
				<img src="/static/dist/images/kd_ico.png" alt="">
			</div>
			<div class="msg">
			<?php echo $data['express']?>：<?php echo $data['logistics']?>
			</div>
		</div>
        <?php endif;?>
        <div class="order-address">
            <div class="l">
                <i class="iconfont icon-shouhuodizhi"></i>
            </div>
            <div class="r">  
                <p>收货人：<?php echo $data['username'].'&emsp;&emsp;&emsp;&emsp;'.$data['mobile']?></p>
                <p>收货地址：<?php echo $data['address'];?></p>                
            </div>
            
        </div>
        <?php endif;?>   
        <div class="line-box"></div> 
        <div class="order-bar btborder">
            <span class="l">
                订单号：<?php echo $data['order_id'];?>
            </span>
            <span class="r">
                <?php echo date('Y-m-d H:i:s',$data['create_time'])?>
            </span>
        </div>  
        <!--<div class="line-box"></div> -->
        <ul class="order-list type03">
            <?php foreach ($data['detail'] as $k => $v) :?> 
            <li>      
                <div class="order-itme">
                    <div class="order-box-1">
                        <div class="l">
                            <img src="<?php echo $v['img_path']?>" alt="<?php echo $v['img_name']?>">
                        </div>
                        <div class="r">
                            <p class="tit">
                                <?php echo $v['goods_name'];?>
                            </p>
                             <p class="ms-tit" >
                               <?php echo $v['activity_desc'];?>
                            </p> 
                            <p class="price-num">
                                <span>¥</span><?php echo $v['price']?>
                                <span class="num">x<?php echo $v['amount']?></span>
                            </p>
                        </div>
                    </div>
                   
                    
                    <!-- <div class="order-box-2">
                        <span class="r">
                            快递&nbsp;&nbsp;&nbsp;<span>免邮</span>
                        </span>
                        <span class="l">
                            配送方式
                        </span>
                    </div>
					<div class="order-box-2">                        
                        <span class="l">
                            买家备注  <span class="bz"><?php echo $data['leave']?></span>
                        </span>
                            
                    </div> -->
                </div>
            </li>
            <!--<div class="line-box"></div>-->
        <?php endforeach;?>
    
            <li>
                <div class="order-itme">
                    <!-- <div class="line-box"></div> -->
                        <div class="order-box-2">
                            <span class="r">
                                快递&nbsp;&nbsp;&nbsp;<span>免邮</span>
                            </span>
                            <span class="l">
                                配送方式
                            </span>
                        </div>
                        <div class="order-box-2">
                            <span class="tit">买家备注：</span>
                            <span class="leave_txt">
                                <?php echo $data['leave']; ?>                           
                            </span>
                            <!--<input class="remarks" readonly type="text" placeholder="选填，对本次交易订单的说明" value="<?php echo $data['leave']; ?>">-->
                        </div>
                </div>
            </li>

        </ul>
            <div class="line-box"></div>
		
        <div class="order-bar sum">
            <span class="l">
                总计 
            </span>
            <span class="r price">
                <span>¥</span><?php echo $price;?>
            </span>
        </div>
        <div class="pd-box"></div>


    </div>

    <script src="/static/dist/js/base.js"></script>

    <script>
        // 矫正rem
        function correctrem() {
            var rem_full_width = $("<div id='rem-test' style='width:7.5rem'></div>").appendTo($('body')).width();
            var device_width = Math.min(document.documentElement.clientWidth, 640);
            if (rem_full_width !== device_width) {
                document.documentElement.style.fontSize = (device_width / 7.5) * (device_width / rem_full_width) + 'px';
            }
            $('#rem-test').remove();
        }
        correctrem();
    </script>

</body>

</html>
